<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>bug</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <script th:src="@{/layui/layui.all.js}"></script>
    <style>
        .layui-laypage .layui-laypage-curr .layui-laypage-em {
            background-color: #1E90FF;
        }

        .layui-form-checked[lay-skin=primary] i {
            background-color: #1E90FF;
            border-color: #1E90FF !important;
        }

        .layui-form-checkbox:hover i {
            border-color: #1E90FF !important;
        }
    </style>
</head>
<body>
<table class="layui-table" id="echarts"></table>
<button class="layui-btn layui-btn-sm" id="export" style="background-color: #1E90FF" onclick="report()">生成报告</button>
<script>
    layui.use('table', function () {
        var table = layui.table;
        var $ = layui.jquery;
        table.render({
            elem: '#echarts',
            totalRow: true,
            // height: 312,
            //数据接口
            url: '/getbug',
            //开启分页
            page: true,
            limits: [10, 50, 100],
            cols: [
                [
                    {type: 'checkbox'},
                    {title: '序号', type: 'numbers'},
                    {field: 'id', title: 'ID', sort: true, totalRowText: '合计'},
                    {field: 'title', title: '标题'},
                    {field: 'level', title: '严重程度', sort: true, totalRow: true},
                    {field: 'openedBy', title: '创建人'},
                    {field: 'openedDate', title: '创建时间', sort: true},
                    {field: 'resolveBy', title: '解决人'},
                    {field: 'resolveDate', title: '解决时间', sort: true},
                    {field: 'closedBy', title: '关闭人'}
                ]
            ]
        });

    });

    function report() {
        window.location.href = "/pie";
    }

</script>
</body>
</html>